# eric7.QScintilla.EditorOutline

Module implementing an outline widget for source code navigation of the editor.

### Global Attributes

None

### Classes

EditorOutlineView | Class implementing an outline widget for source code navigation of the editor.

### Functions

None

## EditorOutlineView

Class implementing an outline widget for source code navigation of the editor.

### Derived from

QTreeView

### Class Attributes

None

### Class Methods

None

### Methods

EditorOutlineView | Constructor
__changeDefaultWidth | Private slot to open a dialog to change the default width and step size presetting the width with the current value.
__completeRepopulate | Private slot to complete the repopulate of the outline view.
__contextMenuRequested | Private slot to show the context menu.
__copyToClipboard | Private slot to copy the file name of the editor to the clipboard.
__createPopupMenus | Private method to generate the various popup menus.
__currentItem | Private method to get a reference to the current item.
__defaultWidth | Private slot to set the outline to the default width.
__editorCursorLineChanged | Private method to highlight a node given its line number.
__editorLanguageChanged | Private slot handling a change of the associated editors source code language.
__editorRenamed | Private slot handling a renaming of the associated editor.
__goto | Private slot to move the editor cursor to the line of the context item.
__gotoAttribute | Private slot to handle the selection of the goto menu.
__gotoItem | Private slot to set the editor cursor.
__prepareRepopulate | Private slot to prepare to repopulate the outline view.
__resizeColumns | Private slot to resize the view when items get expanded or collapsed.
__showGotoMenu | Private slot to prepare the goto submenu of the attribute menu.
isPopulated | Public method to check, if the model is populated.
isSupportedLanguage | Public method to check, if outlining a given language is supported.
mouseDoubleClickEvent | Protected method of QAbstractItemView.
repopulate | Public slot to repopulate the model.
setActive | Public method to activate or deactivate the outline view.

### Static Methods

None

#### EditorOutlineView (Constructor)

EditorOutlineView(editor, parent=None)

Constructor

editor (Editor)
  reference to the editor widget
parent (QWidget)
  reference to the parent widget

#### EditorOutlineView.__changeDefaultWidth

__changeDefaultWidth()

Private slot to open a dialog to change the default width and step size presetting the width with the current value.

#### EditorOutlineView.__completeRepopulate

__completeRepopulate()

Private slot to complete the repopulate of the outline view.

#### EditorOutlineView.__contextMenuRequested

__contextMenuRequested(coord)

Private slot to show the context menu.

coord (QPoint)
  position of the mouse pointer

#### EditorOutlineView.__copyToClipboard

__copyToClipboard()

Private slot to copy the file name of the editor to the clipboard.

#### EditorOutlineView.__createPopupMenus

__createPopupMenus()

Private method to generate the various popup menus.

#### EditorOutlineView.__currentItem

__currentItem()

Private method to get a reference to the current item.

Return:
  reference to the current item

Return Type:
  BrowserItem

#### EditorOutlineView.__defaultWidth

__defaultWidth()

Private slot to set the outline to the default width.

#### EditorOutlineView.__editorCursorLineChanged

__editorCursorLineChanged(lineno)

Private method to highlight a node given its line number.

lineno (int)
  zero based line number of the item

#### EditorOutlineView.__editorLanguageChanged

__editorLanguageChanged()

Private slot handling a change of the associated editors source code language.

#### EditorOutlineView.__editorRenamed

__editorRenamed()

Private slot handling a renaming of the associated editor.

#### EditorOutlineView.__goto

__goto()

Private slot to move the editor cursor to the line of the context item.

#### EditorOutlineView.__gotoAttribute

__gotoAttribute(act)

Private slot to handle the selection of the goto menu.

act (EricAction)
  reference to the action

#### EditorOutlineView.__gotoItem

__gotoItem(index)

Private slot to set the editor cursor.

index (QModelIndex)
  index of the item to set the cursor for

#### EditorOutlineView.__prepareRepopulate

__prepareRepopulate()

Private slot to prepare to repopulate the outline view.

#### EditorOutlineView.__resizeColumns

__resizeColumns()

Private slot to resize the view when items get expanded or collapsed.

#### EditorOutlineView.__showGotoMenu

__showGotoMenu()

Private slot to prepare the goto submenu of the attribute menu.

#### EditorOutlineView.isPopulated

isPopulated()

Public method to check, if the model is populated.

Return:
  flag indicating a populated model

Return Type:
  bool

#### EditorOutlineView.isSupportedLanguage

isSupportedLanguage(language)

Public method to check, if outlining a given language is supported.

language (str)
  source language to be checked

Return:
  flag indicating support

Return Type:
  bool

#### EditorOutlineView.mouseDoubleClickEvent

mouseDoubleClickEvent(mouseEvent)

Protected method of QAbstractItemView.

Reimplemented to disable expanding/collapsing of items when double-clicking. Instead the double-clicked entry is opened.

mouseEvent (QMouseEvent)
  the mouse event

#### EditorOutlineView.repopulate

repopulate()

Public slot to repopulate the model.

#### EditorOutlineView.setActive

setActive(active)

Public method to activate or deactivate the outline view.

active (bool)
  flag indicating the requested action

Up